﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<SDT.Site.ViewModels.UsefulViewModels>" %>
<div class="bor_cor mar_t">
   <div class="bar_org" align="center">&nbsp;Chuyên mục hữu ích</div>
   <%if (Model.Usefuls.Count > 0)
     {
         int index = 0;
         foreach (var item in Model.Usefuls)
         {
             string imgPath = (item.ImagePath != null && item.ImagePath != string.Empty) ? SDT.Lib.Common.Utils.GenThumbnail(item.ID, 60, 60, item.ImagePath, Model.ImagePath, Model.ImageUrl) : SDT.Lib.Common.Globals.DefaultLogo;
             if (index % 2 == 0)
             {
              %>   
               <div class="cm_1" align="center">
   		            <div><a href="<%=item.LinkUrl %>"><img src="<%=imgPath %>" width="60" height="60" /></a></div>
                    <div><a href="<%=item.LinkUrl %>"><strong><%=item.Title%></strong></a></div>
              </div>
          <%}
             else
             { %>
              <div class="cm_r" align="center">
		            <div><a href="<%=item.LinkUrl %>"><img src="<%=imgPath %>" width="60" height="60" /></a></div>
                    <div><a href="<%=item.LinkUrl %>"><strong><%=item.Title%></strong></a></div>
              </div>
              <div class="clear"></div>
              <%if (index < Model.Usefuls.Count - 1)
                { %>
              <div class="line_dot"></div>
              <%} %>
          <%} %>          
          <%index += 1; %>
    <%}
     } %>
   <div class="clear"></div>
</div>